{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 01. Basic Tutorial"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this tutorial, you can learn how to:\n",
    "\n",
    "* Define Search Space\n",
    "* Optimize Objective Function\n",
    "\n",
    "This tutorial describes how to optimize Hyperparameters using HyperOpt without having a mathematical understanding of any algorithm implemented in HyperOpt."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import HyperOpt Library\n",
    "from hyperopt import tpe, hp, fmin"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Declares a purpose function to optimize. In this tutorial, we will optimize a simple function called `objective`, which is a simple quadratic function.\n",
    "\n",
    "$$ y = (x-3)^2 + 2 $$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "objective = lambda x: (x-3)**2 + 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now, let's visualize this objective function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnaUlEQVR4nO3deXxU1f3/8dcnO1vCFiCsAdn3JYLiLi5IBdyLW3ErtV+ttYt16aJW7eJSa6uoVKloFauirVpU3LciEPYl7BAJhCQESEL25fz+yOAvpgmEZCZ3ZvJ+Ph7zyMy5d+Z+coe8uXPumXPNOYeIiISXCK8LEBER/1O4i4iEIYW7iEgYUriLiIQhhbuISBiK8roAgM6dO7vk5GSvyxARCSnLly/f55xLrGtZUIR7cnIyqampXpchIhJSzCy9vmV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gTJPmtNdVgn1Ghr9v1F9X8umUC5L7+ury+LAvG3qOkHRETCUKh3y4iISB0U7iIiYUjhLiIShhTuIiJhSOEuIhKGFO4iImFI4S4iEob+Hzx+8Su8BZtQAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "x = np.linspace(-10, 10, 100)\n",
    "y = objective(x)\n",
    "\n",
    "fig = plt.figure()\n",
    "plt.plot(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We are trying to optimize the objective function by changing the HyperParameter $x$. That's why we will declare a search space for $x$. The functions related to the search space are implemented in `hyperopt.hp`. The list is as follows.\n",
    "\n",
    "* `hp.randint(label, upper)` or `hp.randint(label, low, high)`\n",
    "* `hp.uniform(label, low, high)`\n",
    "* `hp.loguniform(label, low, high)`    \n",
    "* `hp.normal(label, mu, sigma)`\n",
    "* `hp.lognormal(label, mu, sigma)`\n",
    "* `hp.quniform(label, low, high, q)`\n",
    "* `hp.qloguniform(label, low, high, q)`\n",
    "* `hp.qnormal(label, mu, sigma, q)`\n",
    "* `hp.qlognormal(label, mu, sigma, q)`\n",
    "* `hp.choice(label, list)`\n",
    "* `hp.pchoice(label, p_list)` with `p_list` as a list of `(probability, option)` pairs\n",
    "* `hp.uniformint(label, low, high, q)` or `hp.uniformint(label, low, high)` since `q = 1.0`\n",
    "\n",
    "We will use the most basic `hp.uniform` in this tutorial.\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define the search space of x between -10 and 10.\n",
    "space = hp.uniform('x', -10, 10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now, there's only one last step left. So far, we have defined a function of purpose, and we have defined a search space for $x$. Now we can search through the search space $x$ and find the value of $x$ that can optimize the objective function. HyperOpt performs it using `fmin`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100%|██████████| 1000/1000 [00:05<00:00, 168.66trial/s, best loss: 2.0000156172178776]\n",
      "{'x': 3.0039518625833104}\n"
     ]
    }
   ],
   "source": [
    "best = fmin(\n",
    "    fn=objective, # Objective Function to optimize\n",
    "    space=space, # Hyperparameter's Search Space\n",
    "    algo=tpe.suggest, # Optimization algorithm\n",
    "    max_evals=1000 # Number of optimization attempts\n",
    ")\n",
    "print(best)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The optimal $x$ value found by HyperOpt is approximately 3.0. This is very close to a solution of $y=(x-3)^2+2$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAn40lEQVR4nO3deXxU5d3+8c83e4AEAgQIe9j3NeKKVVFBVFB+boiVIhZ9rEvt01qXpy61PPWxYhcVLSqK1qLWpS5FBVcU2cJO2HfDkoQtCYTs9++PDDamCYRkJmcyud6vV16ZnDPLlTPk4sw995xjzjlERCS0hHkdQERE/E/lLiISglTuIiIhSOUuIhKCVO4iIiEowusAAC1btnSdO3f2OoaISL2ybNmy/c65xMrWBUW5d+7cmdTUVK9jiIjUK2a2s6p1Jx2WMbOZZpZpZmvLLXvDzFb6vnaY2Urf8s5mdqzcuuf88huIiMgpqc6e+8vA08Arxxc45649ftnMpgHZ5a6/1Tk3yE/5RESkBk5a7s65+WbWubJ1ZmbANcAFfs4lIiK1UNv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tldlvztw6/HnkrKXys/41q+h3KytAG+jcyh7Sb663HYaXSHb7b5ts4qyN6bPqoNclT4vQbLNGlFW1k3LLavz7UXZfy57gSJff02uqosC8beoww+IiISg+j4sIyIilVC5i4iEIJW7iEgIUrmLiIQglbuISAhSuYuIhCCVu4hICPr/NZER9Ue/RRcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "plt.plot(x, y)\n",
    "plt.scatter(best['x'], objective(best['x']), color='red')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using `space=\"annotated\"`\n",
    "\n",
    "Starting on release 0.2.6, it is allowed to declare the space within the function using type annotations. This saves one step and makes prototyping and space tuning faster."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def objective(\n",
    "    x: hp.uniform('x', -10, 10)  # Declare space as typed\n",
    "):\n",
    "    return (x-3)**2 + 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100%|██████████| 1000/1000 [00:05<00:00, 169.21trial/s, best loss: 2.0000028071024434]\n",
      "{'x': 3.001675440969827}\n"
     ]
    }
   ],
   "source": [
    "best = fmin(\n",
    "    fn=objective, # Objective Function to optimize\n",
    "    space=\"annotated\", # Hyperparameter's Search Space now is declared on objective\n",
    "    algo=tpe.suggest, # Optimization algorithm\n",
    "    max_evals=1000 # Number of optimization attempts\n",
    ")\n",
    "print(best)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bG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p/TzCKACcCwY9zHLt/3bDN7h4qXYfUqq9puPzN7DvigmlUBOTViLbbXZOBiYJTzDThWcx9+315V1OZ39+zUkWYWSUWxv+qce7vq+spl75ybY2bTzaytcy6gB8mqxfPi5ek2LwSWOeeyqq7wanv51KaL/LLdGvuwzHvA1WYWbWYpVPzvu7iG6032XZ4M1PRKwB/OA9Y75zKrW2lmzc0s7uhlKt5UXFPddf2lyjjnZTU8XoOfGtHMxgC/BsY55wpquE5DbK/a/O7vAdf5ZoCcBuQefXkdSL73b14A1jnnnqjhOh1818PMhlPxd70vwLlq87x4ss18anz17MX2qqQ2XeSfv8VAv2Psjy8qCikTKAKygI8qrbuPineWNwAXVlr+PL6ZNUAb4FNgk+976wBmfQm4ucqyjsAc3+XuVLz7vRJIp2J4ItDb7xVgNbDK948kqWou389jqZiNsbmBcmVQMba4wvf1rFfbq7rfHbj56HNJxUvlp33rV1Np1laAt9GZVLwkX1VpO42tku1W37ZZScUb0yMaIFe1z0uQbLNmVJR1y0rLGnx7UfGfy26gxNdfU2rqokD8LerwAyIiIaixD8uIiEg1VO4iIiFI5S4iEoJU7iIiIUjlLiISglTuIiIhSOUuIhKC/j81tRH1Jsfs8QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "plt.plot(x, y)\n",
    "plt.scatter(best['x'], objective(best['x']), color='red')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
